<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:a4j="http://richfaces.org/a4j" >
	
	<head>
		<title>:: Relogio de Ponto - Discover ::</title>
		
		<script language="JavaScript">

			function moveRelogio() {

				momentoAtual = new Date();
				
				hora = momentoAtual.getHours();
				minuto = momentoAtual.getMinutes();
				segundo = momentoAtual.getSeconds();

				horaImprimivel = hora + " : " + minuto + " : " + segundo;

				document.getElementById('relogio').value = horaImprimivel;
				setTimeout(moveRelogio, 1000);
				
			}

		</script>
	
	</head>
	<body onload="moveRelogio()">
		<div align="center">
			
			<rich:panel style="width: 700px" >
				
				<ui:insert name="header" >
					<ui:include src="/sistema/header.xhtml" />
				</ui:insert>
				
				<ui:insert name="menu" >
					<ui:include src="/sistema/menu.xhtml" />		
				</ui:insert>
				
				<rich:panel>			
					<form name="form_relogio">
						<input type="text" id="relogio" name="relogio" size="8" readonly="readonly" />
					</form>					
				</rich:panel>
				
				<rich:panel style="height: 450px;" >
					<f:facet name="header">
						<h:outputText value="#{title}" />
					</f:facet>

					<ui:insert name="main" />
				</rich:panel>
				
			</rich:panel>
		</div>		
	</body>
</html>